package com.jixiantubu.yueban;

import com.example.jixiantubu.R;
import android.app.Fragment;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.RelativeLayout;

public class YueBanFragment extends Fragment implements OnClickListener {
	private View yue;
	private RelativeLayout quanbu, remen, faqiren, fujinchufa, laifujin,
			zhoumo, faqi;
	private LayoutInflater inflater;

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		yue = inflater.inflate(R.layout.ac_genmulu, null);
		initViews();
		return yue;
	}

	private void initViews() {
		quanbu = (RelativeLayout) yue.findViewById(R.id.ac_quanbu_re);
		remen = (RelativeLayout) yue.findViewById(R.id.ac_remen_re);
		faqiren = (RelativeLayout) yue.findViewById(R.id.ac_faqiren_re);
		fujinchufa = (RelativeLayout) yue.findViewById(R.id.ac_fujinchufa_re);
		laifujin = (RelativeLayout) yue.findViewById(R.id.ac_laifujin_re);
		zhoumo = (RelativeLayout) yue.findViewById(R.id.ac_zhoumo_re);
		faqi = (RelativeLayout) yue.findViewById(R.id.ac_faqi_re);
		quanbu.setOnClickListener(this);
		remen.setOnClickListener(this);
		faqiren.setOnClickListener(this);
		fujinchufa.setOnClickListener(this);
		laifujin.setOnClickListener(this);
		zhoumo.setOnClickListener(this);
		faqi.setOnClickListener(this);

	}

	@Override
	public void onClick(View v) {
		switch (v.getId()) {
		case R.id.ac_quanbu_re:
			Intent intent1 = new Intent(getActivity(), YueBan_MuLu_QuanBu.class);
			startActivity(intent1);

			break;
		case R.id.ac_remen_re:
			Intent intent2 = new Intent(getActivity(), YueBan_MuLu_ReMen.class);
			startActivity(intent2);

			break;
		case R.id.ac_faqiren_re:
			Intent intent3 = new Intent(getActivity(),
					YueBan_MuLu_FaQiRen.class);
			startActivity(intent3);

			break;
		case R.id.ac_fujinchufa_re:
			Intent intent4 = new Intent(getActivity(),
					YueBan_MuLu_FuJinChuFa.class);
			startActivity(intent4);

			break;
		case R.id.ac_laifujin_re:
			Intent intent5 = new Intent(getActivity(),
					YueBan_MuLu_LaiFuJin.class);
			startActivity(intent5);

			break;
		case R.id.ac_zhoumo_re:
			Intent intent6 = new Intent(getActivity(), YueBan_MuLu_ZhouMo.class);
			startActivity(intent6);

			break;
		case R.id.ac_faqi_re:
			Intent intent7 = new Intent(getActivity(), YueBan_MuLu_FaQi.class);
			startActivity(intent7);

			break;

		default:
			break;
		}

	}

}
